//
//  XMFristCollectionViewCell.m
//  Second
//
//  Created by Alex on 16/7/16.
//  Copyright © 2016年 蓝鸥科技有限公司西安分公司. All rights reserved.
//

#import "XMFristCollectionViewCell.h"

@interface XMFristCollectionViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *imageView;

@property (weak, nonatomic) IBOutlet UILabel *fristlabel;
@property (weak, nonatomic) IBOutlet UILabel *current_price;

@property (weak, nonatomic) IBOutlet UILabel *place;
@property (weak, nonatomic) IBOutlet UIImageView *headerImage;
@property (weak, nonatomic) IBOutlet UILabel *shool;

@end

@implementation XMFristCollectionViewCell

- (void)awakeFromNib {
    
    self.imageView.layer.masksToBounds = YES;
    self.imageView.layer.cornerRadius = 10;
    
    self.headerImage.layer.masksToBounds = YES;
    self.headerImage.layer.cornerRadius = 10;
    
}

- (void)setcellWithmodel:(XMFristModel *)model {
    
    [self.imageView sd_setImageWithURL:[NSURL URLWithString:model.images[0]]];
    self.fristlabel.text = model.detail;
    self.place.text = [NSString stringWithFormat:@"¥%@",model.price];
    [self.headerImage sd_setImageWithURL:[NSURL URLWithString:model.head_image] placeholderImage:[UIImage imageNamed:@"tabBar_friendTrends_icon"]];
    self.shool.text = model.school;
    self.current_price.text = [NSString stringWithFormat:@"¥%@",model.current_price];
}

@end
